package com.ykht.proj.coupon.Enum;

/**
 * @Author: lazyBoy
 * @Date: 2021/2/2 10:32
 */
public enum AuditStatus {
	/*cms当前状态*/
	STATUS_STICK_1(1,"置顶"),
	STATUS_INFORMATION_TYPE_0(0,"文章"),
	STATUS_INFORMATION_TYPE_1(1,"视频"),
	STATUS_CMS_INFO_1(1,"草稿"),
	STATUS_CMS_INFO_2(2,"草稿(定时发布)"),
	STATUS_CMS_INFO_3(3,"已发布"),
	STATUS_CMS_INFO_4(4,"已提交"),
	STATUS_CMS_INFO_5(5,"已审核"),
	STATUS_CMS_INFO_6(6,"审核失败"),
	STATUS_CMS_INFO_7(7,"下架"),
	STATUS_CMS_INFO_8(8,"已推送");
	/**
	 * 数值
	 */
	private Integer value;
	/**
	 * 描述
	 */
	private String desc;

	private AuditStatus(Integer value, String desc) {
		this.value = value;
		this.desc = desc;
	}


	/**
	 * 根据val值获取desc
	 * @param val 1、0
	 * @return
	 */
	public static String getDescByVal(Integer val) {
		AuditStatus[] values = AuditStatus.values();
		for (AuditStatus oe : values) {
			if (oe.getValue().equals(val)) {
				return oe.getDesc();
			}
		}
		return null;
	}

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
